package com.usabb.pojo.vo;

import com.usabb.domain.MaternityBaseDO;
import com.usabb.domain.MaternityCombosDO;
import lombok.*;

import java.util.ArrayList;
import java.util.List;

//@AllArgsConstructor
//@NoArgsConstructor
@Setter
@Getter
@ToString
@Builder
public class Combos {

    private Long baseId;
    private String combosName;
    private String combosFee;

    List<CombosCategory> categories;



    public static Combos ofBase(CombosAddVO addVO) {
        return Combos.builder()
                .baseId(addVO.getBaseId())
                .combosName(addVO.getCombosName())
                .combosFee(addVO.getCombosFee())
                .build();
    }

//    public List<MaternityCombosDO> to() {
//        List<MaternityCombosDO> list = new ArrayList<>();
//        for (CombosCategory category : categories) {
//            for (CombosCategoryItem item : category.getItems()) {
//                MaternityCombosDO combosDO = new MaternityCombosDO();
//                combosDO.setItemNo(item.getItemNo());
//                combosDO.setItemName(item.getItemName());
//                combosDO.setItemRemark(item.getItemRemark());
//                combosDO.setItemIntro(item.getItemIntro());
//
//                combosDO.setCategory(category.getCategory());
//                combosDO.setBaseId(this.baseId);
//                combosDO.setCombosName(this.combosName);
//                combosDO.setCombosFee(this.combosFee);
//
//                list.add(combosDO);
//            }
//        }
//
//        return list;
//    }

}
